package com.dinnerwithfriends.client;

import java.util.HashMap;

import com.dinnerwithfriends.client.authentication.facebook.FacebookAuthentication;
import com.dinnerwithfriends.client.authentication.google.GoogleLoginInfo;
import com.dinnerwithfriends.client.dinner.accept.AcceptDinner;
import com.dinnerwithfriends.client.model.User;
import com.google.gwt.core.client.EntryPoint;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 * 
 * @Architecture
 */
public class GWTEntryPoint implements EntryPoint {

	public static GoogleLoginInfo loginInfo = null;

	public static User facebookUser;

	public static HashMap<String, User> facebookFriends = new HashMap<String, User>();

	public void onModuleLoad() {

		String who = com.google.gwt.user.client.Window.Location
				.getParameter("who");

		new MainPage();

		if (who == null) {

			new FacebookAuthentication();

		} else {

			new AcceptDinner(who);
		}
	}
}
